3.12.59 \(\int \frac {(A+B x) (d+e x)}{a+c x^2} \, dx\)

Optimal. Leaf size=64 \[ \frac {\tan ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a}}\right ) (A c d-a B e)}{\sqrt {a} c^{3/2}}+\frac {\log \left (a+c x^2\right ) (A e+B d)}{2 c}+\frac {B e x}{c} \]

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 64, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {774, 635, 205, 260} \begin {gather*} \frac {\tan ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a}}\right ) (A c d-a B e)}{\sqrt {a} c^{3/2}}+\frac {\log \left (a+c x^2\right ) (A e+B d)}{2 c}+\frac {B e x}{c} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((A + B*x)*(d + e*x))/(a + c*x^2),x]

[Out]

(B*e*x)/c + ((A*c*d - a*B*e)*ArcTan[(Sqrt[c]*x)/Sqrt[a]])/(Sqrt[a]*c^(3/2)) + ((B*d + A*e)*Log[a + c*x^2])/(2*
c)

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 635

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Dist[d, Int[1/(a + c*x^2), x], x] + Dist[e, Int[x/
(a + c*x^2), x], x] /; FreeQ[{a, c, d, e}, x] &&  !NiceSqrtQ[-(a*c)]

Rule 774

Int[(((d_.) + (e_.)*(x_))*((f_) + (g_.)*(x_)))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(e*g*x)/c, x] + Dist[1
/c, Int[(c*d*f - a*e*g + c*(e*f + d*g)*x)/(a + c*x^2), x], x] /; FreeQ[{a, c, d, e, f, g}, x]

Rubi steps

\begin {align*} \int \frac {(A+B x) (d+e x)}{a+c x^2} \, dx &=\frac {B e x}{c}+\frac {\int \frac {A c d-a B e+c (B d+A e) x}{a+c x^2} \, dx}{c}\\ &=\frac {B e x}{c}+(B d+A e) \int \frac {x}{a+c x^2} \, dx+\frac {(A c d-a B e) \int \frac {1}{a+c x^2} \, dx}{c}\\ &=\frac {B e x}{c}+\frac {(A c d-a B e) \tan ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a}}\right )}{\sqrt {a} c^{3/2}}+\frac {(B d+A e) \log \left (a+c x^2\right )}{2 c}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.05, size = 65, normalized size = 1.02 \begin {gather*} -\frac {\tan ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a}}\right ) (a B e-A c d)}{\sqrt {a} c^{3/2}}+\frac {\log \left (a+c x^2\right ) (A e+B d)}{2 c}+\frac {B e x}{c} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((A + B*x)*(d + e*x))/(a + c*x^2),x]

[Out]

(B*e*x)/c - ((-(A*c*d) + a*B*e)*ArcTan[(Sqrt[c]*x)/Sqrt[a]])/(Sqrt[a]*c^(3/2)) + ((B*d + A*e)*Log[a + c*x^2])/
(2*c)

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {(A+B x) (d+e x)}{a+c x^2} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[((A + B*x)*(d + e*x))/(a + c*x^2),x]

[Out]

IntegrateAlgebraic[((A + B*x)*(d + e*x))/(a + c*x^2), x]

________________________________________________________________________________________

fricas [A]  time = 0.43, size = 147, normalized size = 2.30 \begin {gather*} \left [\frac {2 \, B a c e x + {\left (A c d - B a e\right )} \sqrt {-a c} \log \left (\frac {c x^{2} + 2 \, \sqrt {-a c} x - a}{c x^{2} + a}\right ) + {\left (B a c d + A a c e\right )} \log \left (c x^{2} + a\right )}{2 \, a c^{2}}, \frac {2 \, B a c e x + 2 \, {\left (A c d - B a e\right )} \sqrt {a c} \arctan \left (\frac {\sqrt {a c} x}{a}\right ) + {\left (B a c d + A a c e\right )} \log \left (c x^{2} + a\right )}{2 \, a c^{2}}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(e*x+d)/(c*x^2+a),x, algorithm="fricas")

[Out]

[1/2*(2*B*a*c*e*x + (A*c*d - B*a*e)*sqrt(-a*c)*log((c*x^2 + 2*sqrt(-a*c)*x - a)/(c*x^2 + a)) + (B*a*c*d + A*a*
c*e)*log(c*x^2 + a))/(a*c^2), 1/2*(2*B*a*c*e*x + 2*(A*c*d - B*a*e)*sqrt(a*c)*arctan(sqrt(a*c)*x/a) + (B*a*c*d
+ A*a*c*e)*log(c*x^2 + a))/(a*c^2)]

________________________________________________________________________________________

giac [A]  time = 0.15, size = 59, normalized size = 0.92 \begin {gather*} \frac {B x e}{c} + \frac {{\left (B d + A e\right )} \log \left (c x^{2} + a\right )}{2 \, c} + \frac {{\left (A c d - B a e\right )} \arctan \left (\frac {c x}{\sqrt {a c}}\right )}{\sqrt {a c} c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(e*x+d)/(c*x^2+a),x, algorithm="giac")

[Out]

B*x*e/c + 1/2*(B*d + A*e)*log(c*x^2 + a)/c + (A*c*d - B*a*e)*arctan(c*x/sqrt(a*c))/(sqrt(a*c)*c)

________________________________________________________________________________________

maple [A]  time = 0.05, size = 78, normalized size = 1.22 \begin {gather*} \frac {A d \arctan \left (\frac {c x}{\sqrt {a c}}\right )}{\sqrt {a c}}-\frac {B a e \arctan \left (\frac {c x}{\sqrt {a c}}\right )}{\sqrt {a c}\, c}+\frac {A e \ln \left (c \,x^{2}+a \right )}{2 c}+\frac {B d \ln \left (c \,x^{2}+a \right )}{2 c}+\frac {B e x}{c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*x+A)*(e*x+d)/(c*x^2+a),x)

[Out]

B/c*e*x+1/2/c*ln(c*x^2+a)*A*e+1/2/c*ln(c*x^2+a)*B*d+1/(a*c)^(1/2)*arctan(1/(a*c)^(1/2)*c*x)*A*d-1/c/(a*c)^(1/2
)*arctan(1/(a*c)^(1/2)*c*x)*a*B*e

________________________________________________________________________________________

maxima [A]  time = 1.15, size = 56, normalized size = 0.88 \begin {gather*} \frac {B e x}{c} + \frac {{\left (B d + A e\right )} \log \left (c x^{2} + a\right )}{2 \, c} + \frac {{\left (A c d - B a e\right )} \arctan \left (\frac {c x}{\sqrt {a c}}\right )}{\sqrt {a c} c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(e*x+d)/(c*x^2+a),x, algorithm="maxima")

[Out]

B*e*x/c + 1/2*(B*d + A*e)*log(c*x^2 + a)/c + (A*c*d - B*a*e)*arctan(c*x/sqrt(a*c))/(sqrt(a*c)*c)

________________________________________________________________________________________

mupad [B]  time = 1.73, size = 75, normalized size = 1.17 \begin {gather*} \frac {B\,e\,x}{c}+\frac {A\,e\,\ln \left (c\,x^2+a\right )}{2\,c}+\frac {B\,d\,\ln \left (c\,x^2+a\right )}{2\,c}+\frac {A\,d\,\mathrm {atan}\left (\frac {\sqrt {c}\,x}{\sqrt {a}}\right )}{\sqrt {a}\,\sqrt {c}}-\frac {B\,\sqrt {a}\,e\,\mathrm {atan}\left (\frac {\sqrt {c}\,x}{\sqrt {a}}\right )}{c^{3/2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((A + B*x)*(d + e*x))/(a + c*x^2),x)

[Out]

(B*e*x)/c + (A*e*log(a + c*x^2))/(2*c) + (B*d*log(a + c*x^2))/(2*c) + (A*d*atan((c^(1/2)*x)/a^(1/2)))/(a^(1/2)
*c^(1/2)) - (B*a^(1/2)*e*atan((c^(1/2)*x)/a^(1/2)))/c^(3/2)

________________________________________________________________________________________

sympy [B]  time = 0.73, size = 212, normalized size = 3.31 \begin {gather*} \frac {B e x}{c} + \left (\frac {A e + B d}{2 c} - \frac {\sqrt {- a c^{3}} \left (- A c d + B a e\right )}{2 a c^{3}}\right ) \log {\left (x + \frac {A a e + B a d - 2 a c \left (\frac {A e + B d}{2 c} - \frac {\sqrt {- a c^{3}} \left (- A c d + B a e\right )}{2 a c^{3}}\right )}{- A c d + B a e} \right )} + \left (\frac {A e + B d}{2 c} + \frac {\sqrt {- a c^{3}} \left (- A c d + B a e\right )}{2 a c^{3}}\right ) \log {\left (x + \frac {A a e + B a d - 2 a c \left (\frac {A e + B d}{2 c} + \frac {\sqrt {- a c^{3}} \left (- A c d + B a e\right )}{2 a c^{3}}\right )}{- A c d + B a e} \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(e*x+d)/(c*x**2+a),x)

[Out]

B*e*x/c + ((A*e + B*d)/(2*c) - sqrt(-a*c**3)*(-A*c*d + B*a*e)/(2*a*c**3))*log(x + (A*a*e + B*a*d - 2*a*c*((A*e
 + B*d)/(2*c) - sqrt(-a*c**3)*(-A*c*d + B*a*e)/(2*a*c**3)))/(-A*c*d + B*a*e)) + ((A*e + B*d)/(2*c) + sqrt(-a*c
**3)*(-A*c*d + B*a*e)/(2*a*c**3))*log(x + (A*a*e + B*a*d - 2*a*c*((A*e + B*d)/(2*c) + sqrt(-a*c**3)*(-A*c*d +
B*a*e)/(2*a*c**3)))/(-A*c*d + B*a*e))

________________________________________________________________________________________